home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / EtherPCI Lan Card II (LinkSys)(program disk) / EtherPCI Lan Card II (LinkSys)(program disk).img / NT31 / OEMSETUP.INF < prev   
Encoding:
INI File  |  1996-09-26  |  31.2 KB  |  825 lines

  1. ;
  2. ; Linksys LNEPCI2 Full NIC driver for Windows NT 3.1
  3. ;
  4. [Identification]
  5.     OptionType = NetAdapter
  6. [PlatformsSupported]
  7.     ISA
  8.     EISA
  9.     "Jazz-Internal Bus"
  10. [Options]
  11.     LNEPCI2
  12. [FileConstants]
  13. UtilityInf      = "UTILITY.INF"
  14. ParamInf        = "NCPARAM.INF"
  15. subroutineinf   = "SUBROUTN.INF"
  16. SoftwareType    = "driver"
  17. Exit_Code       = 0
  18. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  19. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  20. Manufacturer    = "LinksysGroupInc"
  21. ProductMajorVersion     = "3"
  22. ProductMinorVersion     = "1"
  23. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  24. ProductSoftwareName     = "LNEPCI2"
  25. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\lnepci2.sys"
  26. NetRuleSoftwareType     = "lnepci2Sys ndisDriver lnepci2Driver"
  27. NetRuleSoftwareUse      = $(SoftwareType)
  28. NetRuleSoftwareBindForm = """lnepci2Sys"" yes no container"
  29. NetRuleSoftwareClass    = {"lnepci2Driver basic"}
  30. NetRuleSoftwareBindable = {"lnepci2Driver lnepci2Adapter non exclusive 100"}
  31. ProductHardwareName     = "LNEPCI2"
  32. NetRuleHardwareType     = "lnepci2 lnepci2Adapter"
  33. NetRuleHardwareBindForm = " yes yes container"
  34. NetRuleHardwareClass    = {"lnepci2Adapter basic"}
  35. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  36. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  37. [GeneralConstants]
  38. from      = ""
  39. to        = ""
  40. ExitCodeOk     = 0
  41. ExitCodeCancel = 1
  42. ExitCodeFatal  = 2
  43. KeyNull         = ""
  44. MAXIMUM_ALLOWED   = 33554432
  45. RegistryErrorIndex = NO_ERROR
  46. KeyProduct      = ""
  47. KeyParameters   = ""
  48. TRUE            = 1
  49. FALSE           = 0
  50. NoTitle            = 0
  51. ExitState   = "Active"
  52. OldVersionExisted = $(FALSE)
  53. DriverPath      = $(!STF_NTPATH)\drivers
  54. [date]
  55.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  56. [Identify]
  57.     read-syms Identification
  58.     set Status     = STATUS_SUCCESSFUL
  59.     set Identifier = $(OptionType)
  60.     set Media      = #("Source Media Descriptions", 1, 1)
  61.     Return $(Status) $(Identifier) $(Media)
  62. [ReturnOptions]
  63.     set Status        = STATUS_FAILED
  64.     set OptionList     = {}
  65.     set OptionTextList = {}
  66.     set LanguageList = ^(LanguagesSupported, 1)
  67.     Ifcontains(i) $($0) in $(LanguageList)
  68.         ifstr(i) $($1) == ""
  69.            goto returnoptions
  70.         endif
  71.         set PlatformList = ^(PlatformsSupported, 1)
  72.         Ifcontains(i) $($1) in $(PlatformList)
  73.            goto returnoptions
  74.         else
  75.            set Status = STATUS_NOTSUPPORTED
  76.            goto finish_ReturnOptions
  77.         endif
  78.     else
  79.         set Status = STATUS_NOLANGUAGE
  80.         goto finish_ReturnOptions
  81.     endif
  82. returnoptions = +
  83.     set OptionList     = ^(Options, 1)
  84.     set OptionTextList = ^(OptionsText$($0), 1)
  85.     set Status         = STATUS_SUCCESSFUL
  86. finish_ReturnOptions = +
  87.     Return $(Status) $(OptionList) $(OptionTextList)
  88. [InstallOption]
  89.     set Option   = $($1)
  90.     set SrcDir   = $($2)
  91.     set AddCopy  = $($3)
  92.     set DoCopy   = $($4)
  93.     set DoConfig = $($5)
  94.     set LanguageList = ^(LanguagesSupported, 1)
  95.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  96.         Return STATUS_NOLANGUAGE
  97.     endif
  98.     set-subst LF = "\n"
  99.     read-syms GeneralConstants
  100.     read-syms FileConstants
  101.     read-syms DialogConstants$(!STF_LANGUAGE)
  102.     ifstr(i) $(!NTN_Origination) == "NCPA"
  103.         set Continue = $(OK)
  104.     endif
  105.     read-syms FileConstants$(!STF_LANGUAGE)
  106.     detect date
  107.     set-title  $(FunctionTitle)
  108.     set to   = Begin
  109.     set from = Begin
  110.     set CommonStatus = STATUS_SUCCESSFUL
  111.     EndWait
  112. Begin = +
  113.     set ActivateDetection = FALSE
  114.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  115.                 set StartLabel = removeadapter
  116.         else-Ifstr(i) $(!NTN_InstallMode) == Update
  117.                         set StartLabel = UpgradeSoftware
  118.         else-Ifstr(i) $(!NTN_InstallMode) == bind
  119.                 set StartLabel = bindingadapter
  120.         else-Ifstr(i) $(!NTN_InstallMode) == configure
  121.                 set CommonStatus = STATUS_REBOOT
  122.                 set ActivateDetection = TRUE
  123.                 set StartLabel = configureadapter
  124.                 Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  125.                         Debug-Output "Cannot configure the Linksys LNEPCI II PCI driver software."
  126.                         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  127.                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  128.                                 Debug-Output "ShellCode error: cannot get an error string."
  129.                                 goto ShellCodeError
  130.                         endif
  131.                         set Error = $($R0)
  132.                         set from = end
  133.                         set to = end
  134.                         goto nonfatalinfo
  135.                 endif
  136.     else
  137.                 set StartLabel = installadapter
  138.                 set OEM_ABANDON_OPTIONS = {}
  139.                 set OEM_ABANDON_SOFTWARE = FALSE
  140.                 set OEM_ABANDON_ON = TRUE
  141.                 set ActivateDetection = TRUE
  142.     endif
  143.     Debug-Output "OEMNADN2.INF: =================================================="
  144.     Debug-Output "OEMNADN2.INF: STF_CWDIR is: "$(!STF_CWDIR)
  145.     Debug-Output "OEMNADN2.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  146.     Debug-Output "OEMNADN2.INF: Option is: "$(Option)
  147.     Debug-Output "OEMNADN2.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  148.     Debug-Output "OEMNADN2.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  149.     Debug-Output "OEMNADN2.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  150.     Debug-Output "OEMNADN2.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  151.     Debug-Output "OEMNADN2.INF: =================================================="
  152.     Set DetectedCard = FALSE
  153.     Ifstr(i) $(ActivateDetection) != TRUE
  154.         Goto skipdetection
  155.     Endif
  156. ; 84-7-31, add one variable for inputing Ethernet IDs.
  157.     set SelectedID = ""
  158. ; 84-7-31
  159. ; 84-7-31, delete these statements.
  160. ;   Set TypeList = {{IRQ,IRQList,IRQValue},+
  161. ;                   {IOADDR, IOBaseAddrDecList, IOBaseAddrValue}}
  162. ;   Debug-Output "OEMNADN2.INF: Calling Param_BuildTypeLists"
  163. ;   Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  164. ;   Set Status = $($R0)
  165. ;   ifstr(i) $(Status) != STATUS_SUCCESSFUL
  166. ;       Goto fataldetect
  167. ;   Endif
  168. ;   Debug-Output "OEMNADN2.INF: Calling Param_SetDefaults"
  169. ;   Shell $(ParamInf) Param_SetDefaults {}
  170. ;   Shell $(ParamInf) HexListFromDecList $(IOBaseAddrDecList)
  171. ;   Set IOBaseAddrHexList = $($R0)
  172. ;   Shell $(UtilityInf) SortList $(IRQList) TRUE FALSE
  173. ;   Set IRQList = $($R0)
  174. ;   Ifstr(i) $(!STF_NCDETECT) == YES
  175. ;       Ifstr(i) $(!STF_NCOPTION) == $(Option)
  176. ;          Set DetectedCard = TRUE
  177. ;          Debug-Output "OEMNADN2.INF: Setting DetectedCard to TRUE"
  178. ;       Endif
  179. ;   Endif
  180. ; 84-7-31
  181. skipdetection =+
  182.     set from = $(fatal)
  183.     set to = $(fatal)
  184.     goto $(StartLabel)
  185. installadapter = +
  186.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  187.     Ifstr $(KeyProduct) != $(KeyNull)
  188.         CloseRegKey $(KeyProduct)
  189.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  190.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  191.                $(ProductVersion)
  192.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  193.                Debug-Output "ShellCode error: cannot get an error string."
  194.                goto ShellCodeError
  195.            endif
  196.            goto end
  197.         else
  198.            Shell $(UtilityInf), CardExistedDlg
  199.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  200.                Debug-Output "ShellCode error: cannot get an error string."
  201.                goto ShellCodeError
  202.            endif
  203.            ifstr(i) $($R1) != "OK"
  204.                set CommonStatus = STATUS_USERCANCEL
  205.                goto end
  206.            endif
  207.            set OldVersionExisted = $(TRUE)
  208.         endif
  209.     endif
  210.     CloseRegKey $(KeyProduct)
  211.     Ifstr(i) $(DetectedCard) != TRUE
  212.         Goto adaptersetup
  213.     Endif
  214.     StartWait
  215.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  216.     EndWait
  217.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  218.         Goto adaptersetup
  219.     Endif
  220.     Set DetectedParams = $($R1)
  221.     Debug-Output "OEMNADN2.INF: Calling Param_SetDefaults to merge detected params" ;
  222.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  223.     goto adapteroptions
  224. configureadapter = +
  225.     Ifstr $(KeyProduct) == $(KeyNull)
  226.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  227.         Ifstr $(KeyProduct) == $(KeyNull)
  228.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  229.             Debug-Output "Cannot find component product key"
  230.             goto fatalregistry
  231.         Endif
  232.     Endif
  233.     Debug-Output "INF: Shelling to FindService"
  234.     Shell $(UtilityInf) FindService, $(KeyProduct)
  235.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  236.         Debug-Output "INF: FindService shell failure"
  237.         Goto ShellCodeError
  238.     Endif
  239.     Ifstr(i) $($R0) != NO_ERROR
  240.         Debug-Output "INF: FindService Shell error: "$($R0)
  241.         Goto fatalregistry
  242.     endif
  243.     set KeyParameters = $($R2)
  244.     CloseRegKey $($R1)
  245.     Ifstr $(KeyParameters) == $(KeyNull)
  246.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  247.         Debug-Output "Cannot find component service"
  248.         goto fatalregistry
  249.     endif
  250.     set OldVersionExisted = $(TRUE)
  251. ; set initial value for every keyword from Configuration Registry Database.
  252.     set ValueName = ""
  253.     set ValueData = ""
  254.     set ValueStr  = ""
  255.     set ValueList = {}
  256.     EnumRegValue $(KeyParameters) ValueList
  257. ; 84-7-31: this section is used to set the initial values of IRQ and IOBASE.
  258. ;   ForListDo $(ValueList)
  259. ;       set ValueItem = $($)
  260. ;       set ValueName = *($(ValueItem),1)
  261. ;       set ValueData = *($(ValueItem),4)
  262. ;       Ifstr(i) $(ValueName) == "InterruptNumber"
  263. ;           set IRQValue = $(ValueData)
  264. ;       else-ifstr(i) $(ValueName) == "IoBaseAddress"
  265. ;           set IOBaseAddrValue = $(ValueData)
  266. ;       else-ifstr(i) $(ValueName) == "BusType"
  267. ;           set BusInterfaceType = $(ValueData)
  268. ;       else-ifstr(i) $(ValueName) == "BusNumber"
  269. ;           set BusNumber = $(ValueData)
  270. ;       endif
  271. ;   EndForListDo
  272. ;   ifstr(i) $(IRQValue) == ""
  273. ;       set IRQValue = *($(IRQList), 2)
  274. ;   endif
  275. ;   ifstr(i) $(IOBaseAddrValue) == ""
  276. ;       set IOBaseAddrValue = *($(IOBaseAddrDecList), 1)
  277. ;   endif
  278. ; 84-7-31
  279. ; 84-7-31 : this section is increased for setting the initial value of Ethernet
  280. ;           ID.
  281.     ForListDo $(ValueList)
  282.         set ValueItem = $($)
  283.         set ValueName = *($(ValueItem),1)
  284.         set ValueData = *($(ValueItem),4)
  285.         Ifstr(i) $(ValueName) == "SelectedID"
  286.             set SelectedID =  $(ValueData)
  287.         endif
  288.     EndForListDo
  289. ; 84-7-31
  290. adaptersetup =+
  291.     Shell $(ParamInf) Param_ParameterConfidence
  292.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  293.         Debug-Output "OEMNADE2.INF: parameter confidence too low to bypass configuration"
  294.         Goto adapteroptions
  295.     Endif
  296.     Ifstr(i) $(DetectedCard) == TRUE
  297.         Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  298.             Goto adapterverify
  299.         Endif
  300.     Endif
  301.     goto adapteroptions
  302. adapteroptions = +
  303.     set from = adapteroptions
  304. ; 84-7-31: this section is used to set BusInterfaceType, delete.
  305. ;   ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  306. ;       ifstr(i) $(!AutoNetInterfaceType) != ""
  307. ;           set BusInterfaceType = $(!AutoNetInterfaceType)
  308. ;       else
  309. ;           set BusInterfaceType = 1
  310. ;       endif
  311. ;       ifstr(i) $(!AutoNetBusNumber) != ""
  312. ;           set BusNumber = $(!AutoNetBusNumber)
  313. ;       else
  314. ;           set BusNumber = 0
  315. ;       endif
  316. ;       goto adapterverify
  317. ;   endif
  318. ; 84-7-31
  319. ; 84-7-31: this section will open a window to let user to input IRQ and IOBASE,
  320. ;          delete.
  321. ;   set IOBaseAddress = *($(IOBaseAddrHexList), ~($(IOBaseAddrDecList),+
  322. ;       $(IOBaseAddrValue)))
  323. ;   read-syms FileDependentDlg$(!STF_LANGUAGE)
  324. ;   ui start "InputDlg"
  325. ;   ifstr(i) $(DLGEVENT) == "CONTINUE"
  326. ;               set IRQValue = $(Combo1Out)
  327. ;               set IOBaseAddress = $(Combo2Out)
  328. ;               ui pop 1
  329. ;   else-ifstr(i) $(DLGEVENT) == "BACK"
  330. ;               set CommonStatus = STATUS_USERCANCEL
  331. ;               Debug-Output "Action: exit. Bye."
  332. ;               ui pop 1
  333. ;               goto end
  334. ;   else
  335. ;               ui pop 1
  336. ;               Debug-Output "Action: unknown. Bye."
  337. ;               goto end
  338. ;   endif
  339. ;   set IOBaseAddrValue = *($(IOBaseAddrDecList), ~($(IOBaseAddrHexList),+
  340. ;       $(IOBaseAddress)))
  341. ; 84-7-31
  342. ; 84-7-31: this section will open a window to let user input BysType, delete.
  343. ;   ifstr(i) $(!STF_NCDETINFO) == {}
  344. ;       Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  345. ;       ifint $($ShellCode) != $(!SHELL_CODE_OK)
  346. ;           Debug-Output "ShellCode error."
  347. ;           goto ShellCodeError
  348. ;       endif
  349. ;       set BusInterfaceType = $($R1)
  350. ;       set BusNumber = $($R2)
  351. ;   else
  352. ;       set BusInterfaceType = *($(!STF_NCDETINFO),5)
  353. ;       set BusNumber = *($(!STF_NCDETINFO),6)
  354. ;   endif
  355. ; 84-7-31
  356. ; 84-7-31: this section will open a window to let user input Ethernet ID.
  357.     read-syms CustomMessageDlg$(!STF_LANGUAGE)
  358.     ui start "InputDlg"
  359.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  360.                 set SelectedID = $(EditTextOut)
  361.                 ui pop 1
  362.     else-ifstr(i) $(DLGEVENT) == "EXIT"
  363.                 ui pop 1
  364.     else
  365.                 ui pop 1
  366.                 Debug-Output "Action: unknown. Bye."
  367.                 goto end
  368.     endif
  369. ; 84-7-31
  370. adapterverify =+
  371.     Ifstr(i) $(DetectedCard) != TRUE
  372.         Goto skipoptions
  373.     Endif
  374.     Debug-Output "OEMNADN2.INF: Calling Param_VerifyCard"
  375.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  376.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  377.         Debug-Output "OEMNADN2.INF: Param_VerifyCard succeeded"
  378.         Goto skipoptions
  379.     Endif
  380.     Set from = adapteroptions
  381.     Set to = skipoptions
  382.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  383.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  384.         Debug-Output "ShellCode error: cannot get an error string."
  385.         goto ShellCodeError
  386.     endif
  387.     set Error = $($R0)
  388.     Goto Warning
  389. skipoptions =+
  390.     ifint $(OldVersionExisted) == $(TRUE)
  391.         ifstr(i) $(!NTN_InstallMode) == configure
  392.                 goto writeparameters
  393.         endif
  394.     endif
  395.     StartWait
  396.     ifint $(OldVersionExisted) == $(FALSE)
  397.         ifstr(i) $(!NTN_InstallMode) == "install"
  398.                 Ifstr(i) $(DoCopy) == "YES"
  399.                     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  400.                     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  401.                         Goto ShellCodeError
  402.                     Else-Ifstr(i) $($R0) == STATUS_FAILED
  403.                         Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  404.                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  405.                            goto ShellCodeError
  406.                         endif
  407.                         set Error = $($R0)
  408.                         Goto fatal
  409.                     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  410.                         Goto successful
  411.                     Endif
  412.                     Set SrcDir = $($R1)
  413.                 Endif
  414.                 install "Install-Option"
  415.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  416.                     Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  417.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  418.                         goto ShellCodeError
  419.                     endif
  420.                     set Error = $($R0)
  421.                     goto fatal
  422.                 endif
  423.         endif
  424.        Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  425.                         $(ProductSoftwareName), +
  426.                         $(ProductSoftwareName), +
  427.                         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  428.                         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  429.                         $(NetEventDLL)
  430.        Set OEM_ABANDON_SOFTWARE = TRUE
  431.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  432.         Debug-Output "ShellCode error"
  433.         goto ShellCodeError
  434.        endif
  435.        set RegistryErrorIndex = $($R0)
  436.        set KeyProduct      = $($R1)
  437.        Set SoftNetRulesKey = $($R2)
  438.        CloseRegKey $($R3)
  439.        CloseRegKey $($R4)
  440.        CloseRegKey $($R5)
  441.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  442.         EndWait
  443.         Debug-Output "Registry error: add software components"
  444.         CloseRegKey $(KeyProduct)
  445.         CloseRegKey $(SoftNetRulesKey)
  446.         goto fatalregistry
  447.        endif
  448.        set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  449.                    {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  450.                    {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  451.                    {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  452.                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  453.                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  454.                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  455.        Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  456.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  457.         Debug-Output "ShellCode error."
  458.         goto ShellCodeError
  459.        endif
  460.        set RegistryErrorIndex = $($R0)
  461.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  462.         EndWait
  463.         Debug-Output "Registry error: add value list."
  464.         CloseRegKey $(KeyProduct)
  465.         CloseRegKey $(SoftNetRulesKey)
  466.         goto fatalregistry
  467.        endif
  468.        set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  469.                         {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  470.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  471.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  472.                         {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  473.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  474.        Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  475.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  476.         Debug-Output "ShellCode error."
  477.         goto ShellCodeError
  478.        endif
  479.        set RegistryErrorIndex = $($R0)
  480.        CloseRegKey $(KeyProduct)
  481.        CloseRegKey $(SoftNetRulesKey)
  482.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  483.         EndWait
  484.         Debug-Output "Resgitry error: add value list."
  485.         goto fatalregistry
  486.        endif
  487.     endif
  488.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  489.     ifint $($R4) != -1
  490.                 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  491.     endif
  492.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  493.                 Debug-Output "Cannot add hardware component"
  494.                 goto ShellCodeError
  495.     endif
  496.     set RegistryErrorIndex = $($R0)
  497.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  498.                 EndWait
  499.                 Debug-Output "Registry error: add hardware component"
  500.                 CloseRegKey $($R1)
  501.                 CloseRegKey $($R2)
  502.                 CloseRegKey $($R3)
  503.                 goto fatalregistry
  504.     endif
  505.     set KeyParameters = $($R3)
  506.     set KeyAdapterRules = $($R2)
  507.     set AdapterNumber = $($R4)
  508.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  509.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  510.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  511.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  512.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  513.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  514.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  515.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  516.                 Debug-Output "ShellCode error"
  517.                 goto ShellCodeError
  518.     endif
  519.     CloseRegKey $($R1)
  520.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  521.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  522.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  523.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  524.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  525.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  526.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  527.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  528.                 Debug-Output "ShellCode error."
  529.                 goto ShellCodeError
  530.     endif
  531.     set RegistryErrorIndex = $($R0)
  532.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  533.                 EndWait
  534.                 Debug-Output "Resgitry error: add value list."
  535.                 CloseRegKey $(KeyParameters)
  536.                 CloseRegKey $(KeyAdapterRules)
  537.                 goto fatalregistry
  538.     endif
  539.     CloseRegKey $(KeyAdapterRules)
  540.     goto writeparameters
  541. writeparameters = +
  542. ; 84-7-31: this section will increase some keywords into the Configuration
  543. ;          Registry Database, delete.
  544. ;   set NewValueList = {{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  545. ;                      {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  546. ;                      {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  547. ;                      {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  548. ;                      {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
  549. ; 84-7-31
  550. ; 84-7-31: this section is increased for adding 'SelectedID' keyword to
  551.     set NewValueList = {{SelectedID,$(NoTitle),$(!REG_VT_SZ),$(SelectedID)},+
  552.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  553.                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  554.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),1}}
  555. ; 84-7-31
  556.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  557.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  558.         Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  559.     endif
  560.     CloseRegKey $(KeyParameters)
  561.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  562.                 Debug-Output "ShellCode error."
  563.                 goto ShellCodeError
  564.     endif
  565.     set RegistryErrorIndex = $($R0)
  566.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  567.                 Debug-Output "Registry error: Add value list"
  568.                 goto fatalregistry
  569.     endif
  570.     EndWait
  571.     goto successful
  572. bindingadapter =+
  573.     set Error = "Binding: Sorry, not yet implemented."
  574.     goto fatal
  575. removeadapter = +
  576.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  577.                 Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  578.                                 $(ProductSoftwareName)
  579.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  580.                                 Debug-Output "ShellCode error"
  581.                                 goto ShellCodeError
  582.                 endif
  583.                 set RegistryErrorIndex = $($R0)
  584.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  585.                                 goto fatalregistry
  586.                 endif
  587.     else
  588.                 Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  589.                         $(ProductSoftwareName), $(!NTN_RegBase)
  590.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  591.                                 Debug-Output "ShellCode error"
  592.                                 goto ShellCodeError
  593.                 endif
  594.                 set RegistryErrorIndex = $($R0)
  595.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  596.                                 goto fatalregistry
  597.                 endif
  598.     endif
  599.     goto end
  600. UpgradeSoftware = +
  601.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  602.     Ifstr $(KeyProduct) != $(KeyNull)
  603.         install "Install-Update"
  604.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  605.             goto fatal
  606.         endif
  607.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  608.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  609.         CloseRegKey $(KeyProduct)
  610.     else
  611.         goto fatalregistry
  612.     endif
  613.     goto end
  614. successful = +
  615.     goto end
  616. abandon = +
  617.     ForListDo $(OEM_ABANDON_OPTIONS)
  618.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  619.             $(ProductSoftwareName), $($)
  620.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  621.             Debug-Output "ShellCode error"
  622.             goto ShellCodeError
  623.         endif
  624.         set RegistryErrorIndex = $($R0)
  625.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  626.             goto fatalregistry
  627.         endif
  628.     EndForListDo
  629.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  630.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  631.             $(ProductSoftwareName), FALSE
  632.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  633.             Debug-Output "ShellCode error"
  634.             goto ShellCodeError
  635.         endif
  636.         set RegistryErrorIndex = $($R0)
  637.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  638.             goto fatalregistry
  639.         endif
  640.     endif
  641.     goto end
  642. warning = +
  643.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  644.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  645.         goto ShellCodeError
  646.     endif
  647.     ifstr(i) $($R1) == "OK"
  648.         goto $(to)
  649.     else-ifstr(i) $($R1) == "CANCEL"
  650.         goto $(from)
  651.     else
  652.         goto "end"
  653.     endif
  654. nonfatalinfo = +
  655.     Set CommonStatus = STATUS_USERCANCEL
  656.     Set Severity = STATUS
  657.     goto nonfatalmsg
  658. nonfatal = +
  659.     Set Severity = NONFATAL
  660.     goto nonfatalmsg
  661. nonfatalmsg = +
  662.     ifstr(i) $(Error) == ""
  663.         Set Severity = NONFATAL
  664.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  665.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  666.             goto ShellCodeError
  667.         endif
  668.         set Error = $($R0)
  669.     endif
  670.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  671.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  672.         goto ShellCodeError
  673.     endif
  674.     ifstr(i) $($R1) == "OK"
  675.         goto $(from)
  676.     else
  677.         goto "end"
  678.     endif
  679. fatalregistry = +
  680.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  681.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  682.         goto ShellCodeError
  683.     endif
  684.     set Error = $($R0)
  685.     goto fatal
  686. fataldetect = +
  687.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  688.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  689.         Debug-Output "ShellCode error: cannot get an error string."
  690.         goto ShellCodeError
  691.     endif
  692.     set Error = $($R0)
  693.     Goto fatal
  694. fatal = +
  695.     ifstr(i) $(Error) == ""
  696.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  697.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  698.             goto ShellCodeError
  699.         endif
  700.         set Error = $($R0)
  701.     endif
  702.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  703.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  704.         goto ShellCodeError
  705.     endif
  706.     goto setfailed
  707. ShellCodeError = +
  708.     set DlgType      = "MessageBox"
  709.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  710.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  711.     set STF_MB_TYPE  = 1
  712.     set STF_MB_ICON  = 3
  713.     set STF_MB_DEF   = 1
  714.     ui start "Error Message"
  715.     goto setfailed
  716. setfailed = +
  717.     set CommonStatus = STATUS_FAILED
  718.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  719.         set OEM_ABANDON_ON = FALSE
  720.         goto abandon
  721.     endif
  722.     goto end
  723. end = +
  724.     goto term
  725. term = +
  726.     Return $(CommonStatus)
  727. [Install-Option]
  728.     set STF_VITAL = ""
  729.     ifstr(i) $(AddCopy) == "YES"
  730.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  731.     endif
  732.     ifstr(i) $(DoCopy) == "YES"
  733.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  734.        CopyFilesInCopyList
  735.     endif
  736.     ifstr(i) $(DoConfig) == "YES"
  737.     endif
  738.     Exit
  739. [Install-Update]
  740.    set STF_VITAL        = ""
  741.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  742.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  743.    exit
  744. [Source Media Descriptions]
  745.     1 = "Linksys LNEPCI II OEM Drivers Disk"
  746. [Signature]
  747.     FileType = MICROSOFT_FILE
  748. [GetSignature]
  749.     read-syms Signature
  750.     return $(FileType)
  751. [ProductType]
  752. STF_PRODUCT  = Winnt
  753. STF_PLATFORM = I386
  754. [Files-Inf]
  755. 1,      oemsetup.inf,    SIZE=31965,     RENAME=$(!UG_Filename)
  756. [Files-LNEPCI2]
  757. 1,LNEPCI2.SYS , SIZE=49664
  758. [LanguagesSupported]
  759.     ENG
  760. [OptionsTextENG]
  761.     LNEPCI2     = "Linksys LNEPCI II PCI Adapter"
  762. [FileConstantsENG]
  763. ProCaption   = "Windows NT Setup"
  764. ProCancel    = "Cancel"
  765. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  766.                "Are you sure you want to cancel copying files?"
  767. ProCancelCap = "Network Setup Message"
  768. ProText1     = "Copying:"
  769. ProText2     = "To:"
  770. FunctionTitle   = "Linksys LNEPCI II PCI Network Card Setup"
  771. ProductSoftwareDescription      = "Linksys LNEPCI II PCI Adapter Driver"
  772. ProductHardwareLNEPCI2Description        = "Linksys LNEPCI II PCI Adapter"
  773. ProductSoftwareTitle    = "Linksys LNEPCI II PCI Adapter Driver"
  774. ProductHardwareLNEPCI2Title      = "Linksys LNEPCI II PCI Adapter"
  775. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  776. ShellCodeErrorText      = "Shell Code Error."
  777. [DialogConstantsENG]
  778. Help        = "&Help"
  779. Exit        = "Cancel"
  780. OK          = "OK"
  781. HelpContext = ""
  782. Continue    = "Continue"
  783. Cancel      = "Cancel"
  784. ; 84-7-31: this section is ised to define the input dialog for inputing IRQ and
  785. ;          IOBASE, delete.
  786. ;[FileDependentDlgENG]
  787. ;Label1 = "&IRQ Level:"
  788. ;Label2 = "I/O &Port Address:"
  789. ;DlgType = "RadioCombination"
  790. ;DlgTemplate = "LNEPCI2"
  791. ;Caption = $(FunctionTitle)
  792. ;Combo1List = $(IRQList)
  793. ;Combo1Out  = $(IRQValue)
  794. ;Combo2List = $(IOBaseAddrHexList)
  795. ;Combo2Out  = $(IOBaseAddress)
  796. ;ComboListItemsIn  = {Combo1List, Combo2List}
  797. ;ComboListItemsOut = {Combo1Out, Combo2Out}
  798. ;EditTextIn = ""
  799. ;EditTextLim = ""
  800. ;CBOptionsGreyed = {}
  801. ;NotifyFields = {NO, NO}
  802. ;HelpContext = $(!IDH_DB_OEMNADN2_INS)
  803. ; 84-7-31
  804. ; 84-7-31: this section has some messages about the window let user input
  805. ;          SelectedID,
  806. [CustomMessageDlgENG]
  807. Caption        = "Input Ethernet ID"
  808. DlgText        = "Please input the Ethernet ID to select a special LNEPCI2 adapter."$(!LF)+
  809.                  "For example:"$(!LF)+
  810.                  "        Ethernet ID: 00E802030405"$(!LF)$(!LF)+
  811.                  "(This option is only required when you have more than "+
  812.                  "one Linksys LNEPCI II PCI adapters on this computer. "+
  813.                  "Select Ignore if only one adapter is installed on "+
  814.                  "this computer.)"
  815. Edit1Label  = "&Ethernet ID:"
  816. Continue       = "&OK"
  817. Exit           = "&Ignore"
  818. Help           = "&Help"
  819. DlgType        = "Edit"
  820. DlgTemplate    = "QUERY_COMPUTER_NAME"
  821. EditTextLim    = 12
  822. EditTextIn     = $(SelectedID)
  823. EditFocus      = "ALL"
  824. ; 84-7-31
  825.